<template>
  <!-- 微帖发布页面 -->
  <view class="main">
    <view class="navigation">
      <view class="navigation_l" @tap="fanLastPage">
        <image src="../../images/aliang/fanhui_.png" mode="aspectFill"></image>
      </view>
      <view class="navigation_c">编辑</view>
      <view class="navigation_r" @tap="handleBaocan"> 发布 </view>
    </view>
    <!-- 编辑器内容 -->
    <view
      class="content_"
      :class="{ contert_buss: businessType && businessIndustry }"
    >
      <!-- 文本域 -->
      <textarea
        placeholder="请输入内容..."
        v-model="content"
        maxlength="2000"
        focus
        auto-height
      />
      <!-- 商品 -->
      <view class="content_goods" v-if="isPushGoods_">
        <view class="goods_edit" @tap="handleGoodsZhe"> 编辑 </view>
        <view class="goods_delete" @tap="handleGoodsShan">
          <image
            src="../../images/aliang/post_delete.png"
            mode="aspectFill"
          ></image>
        </view>
        <view class="goods_left">
          <image :src="goodsDetail.goodsImg" mode="aspectFill"></image>
        </view>
        <view class="goods_right">
          <view class="top_">
            <view class="g_title"> {{ goodsDetail.goodsName }} </view>
            <view class="g_desc"> {{ goodsDetail.goodsBrief }} </view>
          </view>
          <view class="bottom_">
            <view class="g_left">
              <view class="price_"> ￥{{ goodsDetail.presentPrice }}</view>
              <view class="cost_" v-if="goodsDetail.price">
                ￥{{ goodsDetail.price }}
              </view>
            </view>
            <view class="g_right"> 去购买 </view>
          </view>
        </view>
      </view>
      <!-- 活动 -->
      <view class="content_huo" v-if="huoObj">
        <view class="goods_edit" @tap="handleHuoZhe"> 编辑 </view>
        <view class="goods_delete" @tap="handleHuoShan">
          <image
            src="../../images/aliang/post_delete.png"
            mode="aspectFill"
          ></image>
        </view>
        <view class="top_huo">
          <image :src="huoObj.actPoster" mode="aspectFill"></image>
        </view>
        <view class="bottom_huo">
          <view class="left_huo">
            <view class="name_huo"> {{ huoObj.topic }} </view>
            <view class="desc_huo">
              <text>{{ huoObj.actStartTime }}</text>
              <text class="address">{{ huoObj.actAddress }}</text>
            </view>
          </view>
          <view class="right_huo"> 去参加 </view>
        </view>
      </view>
      <!-- 视频 -->
      <view class="content_video" v-if="postVideo">
        <video
          object-fit="cover"
          :src="postVideo"
          title="微帖视频"
          controls
          :poster="firstUrl"
          :duration="duration"
        ></video>
        <image
          src="../../images/aliang/post_delete.png"
          mode="aspectFill"
          @tap="handleShanVideo"
        ></image>
      </view>
      <!-- 图片 -->
      <view class="content_img" v-if="imgGroup.length > 0">
        <view class="item_img" v-for="(v, i) in imgGroup" :key="i">
          <image
            src="../../images/aliang/post_delete.png"
            mode="aspectFill"
            class="shan_img"
            @tap="handleShanImg(i)"
          ></image>
          <image :src="v" mode="aspectFill" @tap="handleImgsGDa(i)"></image>
        </view>
      </view>
      <!-- 附件 -->
      <view class="content_file" v-if="tempFileList.length > 0">
        <view
          class="file_item"
          v-for="(value, index) in tempFileList"
          :key="index"
        >
          <view class="left_file">
            <image src="../../images/aliang/post_file.png" mode=""></image>
            <text>{{ value.name }}</text>
          </view>
          <view class="right_file">
            <image
              src="../../images/aliang/post_delete.png"
              mode="aspectFill"
              @tap="handleFileShan(index)"
            ></image>
          </view>
        </view>
      </view>
      <!-- 商机展示部分 -->
      <view class="content_Business" v-if="businessType && businessIndustry">
        <text>{{ BusinessNameHou }}</text>
        <text>{{ businessIndustry }}</text>
        <image
          src="../../images/aliang/post_delete.png"
          mode="aspectFill"
          @tap="handleBusinessShan"
        ></image>
      </view>
    </view>
    <!-- 底部操作 -->
    <scroll-view scroll-x="true">
      <view class="footer_">
        <view class="footer_left">
          <image
            src="../../images/aliang/post_img.png"
            mode="aspectFill"
            class="foot_img"
            @tap="handleImgsPush"
          ></image>
          <image
            src="../../images/aliang/post_vadio.png"
            mode="aspectFill"
            class="foot_voice"
            @tap="handleVideoPush"
          ></image>
          <image
            src="../../images/aliang/post_flie.png"
            mode="aspectFill"
            class="foot_file"
            @tap="handleFliePush"
          ></image>
        </view>
        <view class="footer_right">
          <view class="foot_Business" @tap="handleBusinessZhe">
            <image
              src="../../images/aliang/Business.png"
              mode="aspectFill"
            ></image>
            <text>商机</text>
          </view>
          <view class="foot_goods" @tap="handleGoodsZhe">
            <image
              src="../../images/aliang/post_goods.png"
              mode="aspectFill"
            ></image>
            <text>商品</text>
          </view>
          <view class="foot_event" @tap="handleHuoZhe">
            <image
              src="../../images/aliang/post_huo.png"
              mode="aspectFill"
            ></image>
            <text>活动</text>
          </view>
          <view class="foot_money">
            <view v-if="isReward == 1" @tap="handleChooseN">
              <image
                src="../../images/aliang/post_choose.png"
                mode="aspectFill"
              ></image>
              <text>赞赏</text>
            </view>
            <view v-if="isReward == 0" @tap="handleChooseY">
              <image
                src="../../images/aliang/post_nochoose.png"
                mode="aspectFill"
              ></image>
              <text>赞赏</text>
            </view>
          </view>
        </view>
      </view>
    </scroll-view>

    <!-- 活动卡片弹起 -->
    <view class="main_zhe" v-if="huo_zhe">
      <view class="events_zhe">
        <view class="top_zhe">
          <view class="left_zhe" @tap="handleHuoNoZhe"> 取消 </view>
          <view class="center_zhe"> 添加活动卡片 </view>
          <view class="right_zhe" @tap="handleHuoPush"> 完成 </view>
        </view>
        <view class="list_zhe">
          <view
            class="item_zhe"
            v-for="(item1, index1) in activityList"
            :key="index1"
            @tap="handleChooseHuo(index1)"
          >
            <view class="top_zhe_huo">
              <image :src="item1.actPoster" mode="aspectFill"></image>
            </view>
            <view class="bottom_zhe_huo">
              <view class="left_zhe_huo">
                <view class="name_"> {{ item1.topic }} </view>
                <view class="desc_">
                  <text class="time_">{{ item1.actStartTime }}</text>
                  <text>{{ item1.actAddress }}</text>
                </view>
              </view>
              <view class="right_zhe_huo">
                <image
                  class="choose_"
                  src="../../images/aliang/xuanzhongX.png"
                  mode="aspectFill"
                  v-if="item1.is_show"
                ></image>
                <image
                  class="nochoose_"
                  src="../../images/aliang/zhenoHuo.png"
                  mode="aspectFill"
                  v-if="!item1.is_show"
                ></image>
              </view>
            </view>
          </view>
        </view>
        <view class="wu_Huo" v-if="activityList.length == 0">
          <image src="../../imges/wuHuoD.png" mode="aspectFill"></image>
          <text>暂无活动</text>
        </view>
      </view>
    </view>
    <!-- 商品卡片弹窗 -->
    <view class="main_zhe" v-if="goods_zhe">
      <view class="goods_zhe">
        <view class="top_zhe">
          <view class="left_zhe" @tap="handleGoodsNoZhe"> 取消 </view>
          <view class="center_zhe"> 添加商品 </view>
          <view class="right_zhe" @tap="handleGoodsPush"> 完成 </view>
        </view>
        <!-- 商品主体 -->
        <view class="goodsBody">
          <view class="goodsTitle">
            <view class="goods_left"> 商品名称 </view>
            <view class="goods_right">
              <input
                type="text"
                v-model="goodsName"
                placeholder="请输入商品名称"
                value=""
                maxlength="12"
              />
            </view>
          </view>
          <view class="goodsDesc">
            <view class="goods_left"> 商品简介 </view>
            <view class="goods_right">
              <input
                type="text"
                v-model="goodsDesc"
                placeholder="可选填"
                maxlength="18"
              />
            </view>
          </view>
          <view class="goodsImg">
            <view class="goodsImgTitle"> 商品图片 </view>
            <view class="goodsImgAdd" v-if="goodsPhoto == ''" @tap="clk">
              <image
                src="../../images/aliang/postAddImg.png"
                mode="aspectFill"
              ></image>
            </view>
            <view class="goodsImgShow" v-if="goodsPhoto">
              <view class="goodsImgChange" @tap="clk"> 替换 </view>
              <view class="goodsImgDa" @tap="goodsImgda">
                <image
                  src="../../images/aliang/postGoodsDa.png"
                  mode="aspectFill"
                ></image>
              </view>
              <image :src="goodsPhoto" mode="aspectFill"></image>
            </view>
          </view>
          <!-- 商品现价原价 -->
          <view class="goodsTitle goodsPrice">
            <view class="goods_left"> 商品现价 </view>
            <view class="goods_right">
              <input
                text="number"
                placeholder="请输入商品现价"
                :value="goodsNowPrice"
                :maxlength="maxNowL"
                @input="handleNowJ"
              />
              <!-- :value="goodsNowPrice" -->
            </view>
          </view>
          <view class="goodsDesc">
            <view class="goods_left"> 商品原价 </view>
            <view class="goods_right">
              <input
                :value="goodsLastPrice"
                text="number"
                placeholder="可选填"
                :maxlength="maxPassL"
                @input="handlePassJ"
              />
            </view>
          </view>
          <view class="goodsBeizhu"> 注：商品邮费需商家支付 </view>
        </view>
      </view>
    </view>
    <!-- 商机卡片弹窗 -->
    <view class="main_zhe" v-if="business_zhe">
      <view class="goods_zhe business_zhe">
        <view class="top_zhe">
          <view class="left_zhe" @tap="handleBusinessNoZhe"> 取消 </view>
          <view class="center_zhe"> 商机设置 </view>
          <view class="right_zhe" @tap="handleBusinessPush"> 完成 </view>
        </view>
        <!-- 商机主体 -->
        <view class="goodsBody">
          <picker
            @change="bindBusinessChange"
            value=""
            :range="BusinessListChange"
          >
            <view class="goodsTitle">
              <view class="goods_left"> 商机类型 </view>
              <view class="goods_right business_right">
                <text style="color: #999" v-if="!BusinessName">请选择</text>
                <text v-if="BusinessName">{{ BusinessName }}</text>
                <image
                  src="../../images/aliang/shangjiL.png"
                  mode="aspectFill"
                ></image>
              </view>
            </view>
          </picker>
          <view class="goodsDesc">
            <view class="goods_left"> 商机行业 </view>
            <view class="goods_right">
              <input
                type="text"
                v-model="BusinessCompany"
                placeholder="请填写"
                placeholder-style="color:#999;"
              />
              <!-- maxlength="10" -->
            </view>
          </view>
        </view>
      </view>
    </view>
    <view v-if="goods_zhe">
      <avatar
        @upload="doUpload"
        quality="1"
        ref="avatar"
        selWidth="250upx"
        selHeight="250upx"
      ></avatar>
    </view>
  </view>
</template>

<script>
import request from "../../utils/request.js";
import avatar from "../../module/yq-avatar/yq-avatar.vue";
export default {
  data() {
    return {
      upToken: "",
      qiniuyun: "",
      qiniuUrl: "",
      quan_id: "", //圈子id
      huo_zhe: false, //控制活动卡片
      goods_zhe: false, //控制商品弹窗
      content: "",
      isReward: 0, //是否赞赏
      goodsDesc: "", //商品简介
      goodsName: "", //商品名称
      goodsNowPrice: "", //商品现价
      goodsLastPrice: "", //商品原价
      goodsPhoto: "", //商品本地
      goodsImg: "", //商品后台
      goodsDetail: {},
      isPushGoods_: false,
      delFlag: 0,
      maxNowL: 9,
      maxPassL: 9,
      pageSize: 10,
      bottom: false,
      activityList: [], //活动列表
      huoObj: "", //活动对象
      activityId: "", //活动id
      activityIndex: "", //活动索引
      fileUrl: [], //文件管理（后端）
      imgGroup: [], //图片数组本地
      postVideo: "",
      duration: "", //视频时长
      firstUrl: "", //视频第一帧
      tempFileList: [], //文件数组
      isPush: true,
      business_zhe: false, //控制商机
      BusinessListChange: [],
      BusinessList: [],
      BusinessName: "",
      BusinessValue: null,
      BusinessCompany: "",
      businessIndustry: "", //后端
      businessType: null,
      BusinessNameHou: "",
    };
  },
  components: {
    avatar,
  },
  onReachBottom() {
    if (this.huo_zhe && this.activityList.length > 2) {
      this.bottom = true;
      uni.showLoading({
        title: "加载中",
      });
      this.pageSize = this.pageSize + 10;
      this.handleHuoList();
    }
  },
  onShow() {},
  onLoad(options) {
    this.quan_id = options.id; //圈子id
    request({
      //获取七牛云参数
      url: "h5/home/uploadApplication",
      method: "post",
      header: {
        "content-type": "application/json;charset=UTF-8",
        "api-client": "72e0fee8172411ea995200163e05ff66",
        "api-version": this.globalData.apiVersion,
        "Source-Type": 7,
      },
      data: {},
    }).then((res) => {
      this.upToken = res.data.data.upToken;
      this.qiniuyun = res.data.data.qiniuDomain;
      this.qiniuUrl = res.data.data.region;
    });
    this.handleHuoList(); //获取活动卡片数据
    this.handleBusinessList(); //获取商机列表数据
  },
  methods: {
    fanLastPage() {
      //返回上一页
      uni.redirectTo({
        url: "/pages/circle/index?id=" + this.quan_id + "&isTanMask=0",
      });
      // window.history.go(-1);
    },
    handleBusinessShan() {
      //商机删除
      uni.showModal({
        title: "提示",
        content: "确认删除附加商机吗",
        success: (res) => {
          if (res.confirm) {
            this.BusinessName = "";
            this.BusinessValue = null;
            this.BusinessCompany = "";
            this.businessIndustry = ""; //后端
            (this.businessType = null), (this.BusinessNameHou = "");
            uni.showToast({
              title: "已删除",
              duration: 1000,
              icon: "none",
            });
          }
        },
      });
    },
    handleBusinessPush() {
      if (!this.BusinessName || !this.BusinessValue) {
        uni.showToast({
          title: "请选择商机类型",
          duration: 1000,
          icon: "none",
        });
        return false;
      }
      if (this.BusinessCompany.trim() == "") {
        uni.showToast({
          title: "请填写商机行业",
          duration: 2000,
          icon: "none",
        });
        return false;
      }
      if (this.BusinessCompany.trim().length > 10) {
        uni.showToast({
          title: "商机行业最多输入十位",
          duration: 2000,
          icon: "none",
        });
        return false;
      }
      this.businessIndustry = this.BusinessCompany.trim();
      this.businessType = this.BusinessValue;
      this.BusinessNameHou = this.BusinessName;
      this.business_zhe = false;
    },
    bindBusinessChange(e) {
      this.BusinessName = this.BusinessList[e.detail.value].dictName;
      this.BusinessValue = this.BusinessList[e.detail.value].dictValue;
      // console.log(this.BusinessValue)
    },
    handleBaocan() {
      if (this.isPush == false) {
        return false;
      } else {
        // var arrImg = this.fileUrl.filter((v) => {
        // 	return v.fileType == 1;
        // });
        if (!this.content.trim() && this.fileUrl.length == 0) {
          uni.showToast({
            title: "请填写发布内容",
            duration: 1500,
            icon: "none",
          });
          return false;
        }
        uni.showLoading({
          title: "正在发布...",
        });
        //点击发布
        let token = uni.getStorageSync("token");
        if (!token) {
          uni.showToast({
            title: "请授权登录再操作！",
            duration: 2000,
            icon: "none",
          });
          setTimeout(() => {
            uni.navigateTo({
              url: "/pages/index/index",
            });
          }, 1500);
        } else {
          request({
            url: "h5/orgMessage/savePost?uid=",
            method: "POST",
            header: {
              "Content-Type": "application/json",
              "api-client": "72e0fee8172411ea995200163e05ff66",
              "api-version": this.globalData.apiVersion,
              "Source-Type": 7,
              token: token,
            },
            data: {
              uid: "",
              orgId: this.quan_id,
              messageType: 13,
              friendsTopic: "",
              content: this.content,
              isOnlyOrg: 0,
              sourceType: 6,
              isReward: this.isReward,
              imgCollection: this.fileUrl,
              goodsInfo: this.goodsDetail,
              businessType: this.businessType,
              businessIndustry: this.businessIndustry,
              // goodsInfo: {
              //   //商品参数
              //   id: "",
              //   goodsName: this.goodsName,
              //   goodsBrief: this.goodsDesc,
              //   goodsImg: this.goodsImg,
              //   price: this.goodsLastPrice,
              //   presentPrice: this.goodsNowPrice,
              //   delFlag: this.delFlag,
              // },
              activityId: this.activityId, //活动id
              sourceType: 7,
            },
          }).then((res) => {
            this.isPush = false;
            // console.log(res, '发布微帖')
            uni.hideLoading();
            if (res.data.code == 200) {
              uni.showToast({
                title: "发布成功",
                duration: 1500,
                icon: "none",
              });
              var indexType = 1;
              if (this.fileUrl.length > 0) {
                var imgListHB = this.fileUrl.filter((v) => {
                  return v.fileType == 1;
                });
                var fileListHB = this.fileUrl.filter((v) => {
                  return v.fileType == 2;
                });
                var vodieListHB = this.fileUrl.filter((v) => {
                  return v.fileType == 3;
                });
              }
              if (this.activityId) {
                //活动
                indexType = 5;
              } else if (
                this.goodsDetail.goodsName &&
                this.goodsDetail.goodsImg
              ) {
                //商品
                indexType = 4;
              } else if (this.businessType !== null && this.businessIndustry) {
                //商机
                indexType = 2;
              } else if (this.fileUrl.length > 0 && fileListHB.length > 0) {
                //文件
                indexType = 3;
              } else {
                //微帖
                indexType = 1;
              }
              setTimeout(() => {
                uni.redirectTo({
                  url:
                    "/pages/circle/index?id=" +
                    this.quan_id +
                    "&index=" +
                    indexType +
                    "&isTanMask=0",
                });
              }, 1500);
            } else {
              uni.showToast({
                title: res.data.msg,
                duration: 2000,
                icon: "none",
              });
            }
          });
        }
      }
    },
    handleFileShan(index) {
      //附件删除
      uni.showModal({
        title: "提示",
        content: "确认删除该附件吗",
        success: (res) => {
          if (res.confirm) {
            this.tempFileList.splice(index, 1);
            let imgList = this.fileUrl.filter((v) => {
              return v.fileType == 1;
            });
            let flieList = this.fileUrl.filter((v) => {
              return v.fileType == 2;
            });
            let vodList = this.fileUrl.filter((v) => {
              return v.fileType == 3;
            });
            this.fileUrl = [...flieList, ...imgList, ...vodList];
            this.fileUrl.splice(index, 1);
            console.log(this.fileUrl);
          }
        },
      });
    },
    handleFliePush() {
      //附件上传
      uni.chooseFile({
        count: 10,
        type: "all",
        success: (res) => {
          if (this.tempFileList.length != 0) {
            this.tempFileList = [...this.tempFileList, ...res.tempFiles];
          } else {
            this.tempFileList = res.tempFiles;
          }
          uni.showLoading({
            title: "上传中",
          });
          res.tempFiles.forEach((v, i) => {
            uni.uploadFile({
              url: "https://up-z0.qiniup.com",
              filePath: v.path,
              name: "file",
              formData: {
                token: this.upToken,
              },
              success: (uploadFileRes) => {
                let vdaList = this.fileUrl.filter((v) => {
                  return v.fileType == 3;
                });
                let fileList = this.fileUrl.filter((v) => {
                  return v.fileType == 2;
                });
                let mList = this.fileUrl.filter((v) => {
                  return v.fileType == 1;
                });
                var flieArr = [];
                flieArr.push({
                  fileUrl:
                    this.qiniuyun + "/" + JSON.parse(uploadFileRes.data).key,
                  fileName: v.name,
                  fileType: 2,
                });
                var fileListArr = [...fileList, ...flieArr];
                this.fileUrl = [...mList, ...fileListArr, ...vdaList];
                uni.hideLoading();
                uni.showToast({
                  title: "上传成功",
                  duration: 1500,
                  icon: "none",
                });
              },
            });
          });
        },
      });
    },
    handleShanVideo() {
      //删除视频
      uni.showModal({
        title: "提示",
        content: "确定删除当前视频吗？",
        success: (res) => {
          if (res.confirm) {
            this.postVideo = "";
            this.fileUrl = this.fileUrl.filter((v) => {
              return v.fileType != 3;
            });
          }
        },
      });
    },
    handleVideoPush() {
      //上传视频
      if (this.postVideo) {
        uni.showToast({
          title: "最多上传1个视频",
          duration: 1000,
          icon: "none",
        });
        return false;
      }
      uni.chooseVideo({
        count: 1,
        sourceType: ["camera", "album"],
        success: (res) => {
          console.log(res);
          this.postVideo = res.tempFilePath;
          this.duration = res.duration; //视频时长
          uni.showLoading({
            title: "上传中",
          });
          if (res.duration == 0) {
            this.duration = "";
          }
          uni.uploadFile({
            url: "https://up-z0.qiniup.com",
            filePath: res.tempFilePath,
            name: "file",
            formData: {
              token: this.upToken,
            },
            success: (uploadFileRes) => {
              let arr = [];
              arr.push({
                fileUrl:
                  this.qiniuyun + "/" + JSON.parse(uploadFileRes.data).key,
                firstUrl:
                  this.qiniuyun +
                  "/" +
                  JSON.parse(uploadFileRes.data).key +
                  "?vframe/jpg/offset/1",
                fileType: 3,
                videoTime: this.duration,
                height: res.height,
              });

              this.firstUrl =
                this.qiniuyun +
                "/" +
                JSON.parse(uploadFileRes.data).key +
                "?vframe/jpg/offset/1";

              this.fileUrl = [...this.fileUrl, ...arr];
              uni.hideLoading();
              uni.showToast({
                title: "上传成功",
                duration: 1500,
                icon: "none",
              });
            },
          });
        },
      });
    },
    handleImgsGDa(index) {
      uni.previewImage({
        urls: this.imgGroup,
        current: index,
      });
    },
    handleShanImg(index) {
      //删图片
      uni.showModal({
        title: "提示",
        content: "确认删除此张图片吗",
        success: (res) => {
          if (res.confirm) {
            this.imgGroup.splice(index, 1);
            let imgList = this.fileUrl.filter((v) => {
              return v.fileType == 1;
            });
            let flieList = this.fileUrl.filter((v) => {
              return v.fileType == 2;
            });
            let vodList = this.fileUrl.filter((v) => {
              return v.fileType == 3;
            });
            this.fileUrl = [...imgList, ...flieList, ...vodList];
            this.fileUrl.splice(index, 1);
          }
        },
      });
    },
    handleImgsPush() {
      //上传图片
      if (this.imgGroup.length >= 9) {
        uni.showToast({
          title: "最多上传9张图片",
          duration: 1500,
          icon: "none",
        });
        return false;
      }
      uni.chooseImage({
        count: 9,
        success: (res) => {
          let tempFilePaths = res.tempFilePaths;
          this.imgGroup = [...this.imgGroup, ...tempFilePaths];
          if (this.imgGroup.length >= 9) {
            this.imgGroup.length = 9;
          }
          uni.showLoading({
            title: "上传中",
          });
          tempFilePaths.forEach((v, i) => {
            uni.uploadFile({
              url: "https://up-z0.qiniup.com",
              filePath: tempFilePaths[i],
              name: "file",
              formData: {
                token: this.upToken,
              },
              success: (uploadFileRes) => {
                let vdaList = this.fileUrl.filter((v) => {
                  return v.fileType == 3;
                });
                let fileList = this.fileUrl.filter((v) => {
                  return v.fileType == 2;
                });
                let mList = this.fileUrl.filter((v) => {
                  return v.fileType == 1;
                });
                let imList = [];
                imList.push({
                  fileUrl:
                    this.qiniuyun + "/" + JSON.parse(uploadFileRes.data).key,
                });
                imList.map((v) => {
                  v.fileType = 1;
                  return v;
                });
                var imgListimg = [...mList, ...imList]; //最多9张图片
                if (imgListimg.length >= 9) {
                  uni.showToast({
                    title: "最多上传9张图片",
                    duration: 1000,
                    icon: "none",
                  });
                  imgListimg.length = 9;
                }
                this.fileUrl = [...imgListimg, ...fileList, ...vdaList];
                uni.hideLoading();
                uni.showToast({
                  title: "上传成功",
                  duration: 1500,
                  icon: "none",
                });
              },
            });
          });
        },
      });
    },
    handleBusinessList() {
      //商机列表
      let token = uni.getStorageSync("token");
      if (!token) {
        uni.showToast({
          title: "请授权登录再操作！",
          duration: 2000,
          icon: "none",
        });
        setTimeout(() => {
          uni.navigateTo({
            url: "/pages/index/index",
          });
        }, 2000);
      } else {
        request({
          url: "h5/home/listBydictType?uid=",
          method: "POST",
          header: {
            "Content-Type": "application/json",
            "api-client": "72e0fee8172411ea995200163e05ff66",
            "api-version": this.globalData.apiVersion,
            "Source-Type": 7,
            token: token,
          },
          data: {
            dictType: "BUSINESS_STYLE_NEW",
          },
        }).then((res) => {
          if (res.data.code == 200) {
            console.log(res);
            this.BusinessList = res.data.data;
            this.BusinessListChange = [];
            res.data.data.forEach((v) => {
              this.BusinessListChange.push(v.dictName);
            });
          } else {
            uni.showToast({
              title: res.data.msg,
              duration: 2000,
              icon: "none",
            });
          }
        });
      }
    },
    handleBusinessZhe() {
      //控制商机
      this.business_zhe = true;
    },
    handleBusinessNoZhe() {
      //控制商机
      this.business_zhe = false;
    },
    handleGoodsZhe() {
      //控制商品
      this.goods_zhe = true;
    },
    handleGoodsNoZhe() {
      this.goods_zhe = false;
    },
    handleGoodsShan() {
      //商品删除
      uni.showModal({
        title: "提示",
        content: "确认删除附加商品吗",
        success: (res) => {
          if (res.confirm) {
            this.goodsDesc = ""; //商品简介
            this.goodsName = ""; //商品名称
            this.goodsNowPrice = ""; //商品现价
            this.goodsLastPrice = ""; //商品原价
            this.goodsPhoto = ""; //商品本地
            this.goodsImg = ""; //商品后台
            this.goodsDetail = {};
            this.isPushGoods_ = false;
            this.delFlag = 1;
            uni.showToast({
              title: "已删除",
              duration: 1000,
              icon: "none",
            });
          }
        },
      });
    },
    handleGoodsPush() {
      //添加商品完成
      if (this.goodsName.trim() == "") {
        uni.showToast({
          title: "请填写商品名称",
          duration: 1000,
          icon: "none",
        });
        return false;
      }
      if (this.goodsImg == "") {
        uni.showToast({
          title: "请上传商品封面",
          duration: 1000,
          icon: "none",
        });
        return false;
      }
      if (this.goodsNowPrice == "" || Number(this.goodsNowPrice) <= 0) {
        uni.showToast({
          title: "请填写合法的商品价格",
          duration: 1000,
          icon: "none",
        });
        return false;
      }

      var reg = /^(-)?(0|[1-9]\d*)\.\d{1,2}$/;
      if (
        !reg.test(this.goodsNowPrice) &&
        !Number.isInteger(Number(this.goodsNowPrice))
      ) {
        uni.showToast({
          title: "商品现价需保留两位小数",
          duration: 1000,
          icon: "none",
        });
        return false;
      }

      if (
        !reg.test(this.goodsLastPrice) &&
        this.goodsLastPrice &&
        !Number.isInteger(Number(this.goodsLastPrice))
      ) {
        uni.showToast({
          title: "商品原价需保留两位小数",
          duration: 1000,
          icon: "none",
        });
        return false;
      }

      if (
        Number(this.goodsNowPrice) > Number(this.goodsLastPrice) &&
        this.goodsLastPrice
      ) {
        uni.showToast({
          title: "商品现价不可大于原价",
          duration: 1000,
          icon: "none",
        });
        return false;
      }

      var r = /^\+?[1-9][0-9]*$/; //正整数
      if (this.goodsNowPrice && r.test(this.goodsNowPrice)) {
        this.goodsNowPrice = this.goodsNowPrice + ".00";
      }
      if (this.goodsLastPrice && r.test(this.goodsLastPrice)) {
        this.goodsLastPrice = this.goodsLastPrice + ".00";
      }
      var red = /^(-)?(0|[1-9]\d*)\.\d{1}$/;
      if (this.goodsNowPrice && red.test(this.goodsNowPrice)) {
        this.goodsNowPrice = this.goodsNowPrice + "0";
      }
      if (this.goodsLastPrice && red.test(this.goodsLastPrice)) {
        this.goodsLastPrice = this.goodsLastPrice + "0";
      }

      this.goodsDetail = {
        goodsName: this.goodsName,
        goodsBrief: this.goodsDesc,
        goodsImg: this.goodsImg,
        price: this.goodsLastPrice,
        presentPrice: this.goodsNowPrice,
        delFlag: 0,
      };
      this.isPushGoods_ = true;
      uni.showToast({
        title: "保存成功",
        duration: 1200,
        icon: "none",
      });
      setTimeout(() => {
        this.goods_zhe = false;
      }, 500);
    },
    handlePassJ(e) {
      //过去价格
      if (
        e.detail.value &&
        e.detail.value.search(/[^\d{1,}\.\d{1,}|\d{1,}]/g) != -1
      ) {
        e.detail.value = "";
      }
      e.detail.value =
        e.detail.value &&
        e.detail.value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g, "");
      if (e.detail.value == "") {
        setTimeout(() => {
          this.maxPassL = -100;
          this.goodsLastPrice = "";
        }, 10);
      }

      if (
        e.detail.value[0] == 0 &&
        e.detail.value[1] != "." &&
        e.detail.value.length > 1
      ) {
        // console.log(e)
        setTimeout(() => {
          this.maxlength = -1;
          this.goodsLastPrice = "";
        }, 10);
      }
      this.maxPassL = 9;
      var result = "";
      if (e.detail.value && e.detail.value.indexOf(".") != -1) {
        result = e.detail.value.substring(
          e.detail.value.indexOf(".") + 1,
          e.detail.value.length
        );
      }
      if (result.length == 2) {
        this.maxPassL = e.detail.value.length;
      }
      this.goodsLastPrice = e.detail.value;
      if (e.detail.value < 0) {
        this.goodsLastPrice = "";
      }
      if (e.detail.value > 500000) {
        this.maxPassL = 6;
        this.goodsLastPrice = 500000;
      }
    },
    handleNowJ(e) {
      if (
        e.detail.value &&
        e.detail.value.search(/[^\d{1,}\.\d{1,}|\d{1,}]/g) != -1
      ) {
        e.detail.value = "";
      }
      e.detail.value =
        e.detail.value &&
        e.detail.value.replace(/[^\d{1,}\.\d{1,}|\d{1,}]/g, "");
      if (e.detail.value == "") {
        setTimeout(() => {
          this.maxNowL = -100;
          this.goodsNowPrice = "";
        }, 10);
      }
      if (
        e.detail.value[0] == 0 &&
        e.detail.value[1] != "." &&
        e.detail.value.length > 1
      ) {
        setTimeout(() => {
          this.maxNowL = -100;
          this.goodsNowPrice = "";
        }, 10);
      }
      this.maxNowL = 9;
      var result = "";
      if (e.detail.value && e.detail.value.indexOf(".") != -1) {
        result = e.detail.value.substring(
          e.detail.value.indexOf(".") + 1,
          e.detail.value.length
        );
      }
      if (result.length == 2) {
        this.maxNowL = e.detail.value.length;
      }
      this.goodsNowPrice = e.detail.value;
      if (e.detail.value < 0) {
        this.goodsNowPrice = "";
      }
      if (e.detail.value > 500000) {
        this.maxNowL = 6;
        this.goodsNowPrice = 500000;
      }
    },
    goodsImgda() {
      uni.previewImage({
        urls: [this.goodsImg],
        current: 0,
      });
    },
    clk() {
      this.$refs.avatar.fChooseImg(2, {
        selWidth: "400upx",
        selHeight: "400upx",
        inner: false,
        canRotate: false,
      });
    },
    doUpload(rsp) {
      this.$set([this.goodsImg], rsp.index, rsp.path);
      this.goodsPhoto = rsp.path;
      uni.showLoading({
        title: "上传中",
      });
      uni.uploadFile({
        url: "https://up-z0.qiniup.com",
        filePath: rsp.path,
        name: "file",
        formData: {
          token: this.upToken,
        },
        success: (uploadFileRes) => {
          this.goodsImg =
            this.qiniuyun + "/" + JSON.parse(uploadFileRes.data).key;
          if (JSON.parse(uploadFileRes.data).key) {
            uni.hideLoading();
          }
        },
      });
    },
    handleHuoZhe() {
      //控制活动
      this.huo_zhe = true;
    },
    handleHuoNoZhe() {
      this.huo_zhe = false;
    },
    handleChooseY() {
      this.isReward = 1;
    },
    handleChooseN() {
      this.isReward = 0;
    },
    handleHuoShan() {
      //删除活动
      uni.showModal({
        title: "提示",
        content: "确认删除附加活动吗",
        success: (res) => {
          if (res.confirm) {
            this.activityList.forEach((v) => {
              v.is_show = false;
            });
            this.huoObj = "";
            this.activityId = "";
            uni.showToast({
              title: "已删除",
              duration: 1000,
              icon: "none",
            });
          }
        },
      });
    },
    handleHuoPush() {
      if (this.activityList.length == 0) {
        this.huo_zhe = false;
      } else {
        let huoList = this.activityList.filter((v) => {
          return v.is_show == true;
        });
        if (huoList.length == 0) {
          uni.showToast({
            title: "请选择活动~",
            duration: 1000,
            icon: "none",
          });
        } else {
          //赋值操作
          this.huoObj = huoList[0];
          this.activityId = huoList[0].id;
          uni.showToast({
            title: "保存成功",
            duration: 1000,
            icon: "none",
          });
          setTimeout(() => {
            this.huo_zhe = false;
          }, 800);
        }
      }
    },
    handleChooseHuo(index) {
      this.activityIndex = index;
      this.activityList.forEach((v) => {
        v.is_show = false;
      });
      this.activityList[index].is_show = true;
    },
    handleHuoList() {
      //活动列表
      let token = uni.getStorageSync("token");
      if (token) {
        request({
          url: "h5/actManage/myCreate",
          method: "POST",
          header: {
            "Content-Type": "application/json",
            "api-client": "72e0fee8172411ea995200163e05ff66",
            "api-version": this.globalData.apiVersion,
            "Source-Type": 7,
            token: token,
          },
          data: {
            pageNumber: 1,
            pageSize: this.pageSize,
            id: "",
          },
        }).then((res) => {
          if (res.data.code == 200) {
            res.data.data.rows.map((v) => {
              v.is_show = false;
              return v;
            });
            if (this.activityIndex) {
              res.data.data.rows[this.activityIndex].is_show = true;
            }
            this.activityList = res.data.data.rows;
            if (this.activityIndex) {
              this.activityList[this.activityIndex].is_show = true;
            }
            if (res.data.data.total == 0) {
              uni.hideLoading();
              return false;
            }
            if (this.bottom && this.activityList.length > 0) {
              if (this.activityList.length < res.data.data.total) {
                uni.hideLoading();
                uni.showToast({
                  title: "加载完成",
                  duration: 1500,
                  icon: "none",
                });
              } else if (this.activityList.length >= res.data.data.total) {
                uni.hideLoading();
              }
            }
          } else {
            uni.showToast({
              title: res.data.msg,
              duration: 2000,
              icon: "none",
            });
          }
        });
      }
    },
  },
};
</script>

<style lang="less" scoped>
.main {
  position: relative;
  .main_zhe {
    background-color: rgba(0, 0, 0, 0.6);
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 666;
  }
  .goods_zhe .goodsBody {
    padding: 0 36rpx;
    padding-top: 148rpx;
    .goodsBeizhu {
      margin-top: 52rpx;
      font-size: 24rpx;
      font-family: PingFangSC, PingFangSC-Regular;
      font-weight: 400;
      text-align: left;
      color: #999999;
      line-height: 33rpx;
      // padding-bottom: 180rpx;
    }
    .goodsTitle,
    .goodsDesc {
      display: flex;
      align-items: center;
      width: 678rpx;
      height: 88rpx;
      border: 1rpx solid #dddddd;
      border-radius: 8rpx;
      padding: 0 23rpx;
      box-sizing: border-box;
      margin-top: 28rpx;
      justify-content: space-between;
      .goods_left {
        font-size: 34rpx;
        font-family: PingFangSC, PingFangSC-Regular;
        font-weight: 400;
        text-align: justify;
        color: #111111;
      }
      .goods_right {
        flex: 1;
        padding-left: 23rpx;
        box-sizing: border-box;
        height: 100%;
        input {
          width: 100%;
          height: 100%;
          font-size: 34rpx;
          font-family: PingFangSC, PingFangSC-Regular;
          font-weight: 400;
          text-align: justify;
          color: #111111;
          text-align: right;
        }
      }
      .business_right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        image {
          margin-left: 10rpx;
          width: 28rpx;
          height: 16rpx;
          vertical-align: cneter;
        }
        text {
          color: #353535;
          font-size: 34rpx;
        }
      }
      // justify-content: space-between;
    }
    .goodsDesc {
      margin-top: 12rpx;
    }
    .goodsPrice {
      margin-top: 70rpx;
    }
    .goodsImg {
      .goodsImgTitle {
        margin-top: 53rpx;
        font-size: 34rpx;
        font-family: PingFangSC, PingFangSC-Regular;
        font-weight: 400;
        text-align: justify;
        color: #111111;
        line-height: 48rpx;
      }
      .goodsImgAdd {
        margin-top: 15rpx;
        width: 240rpx;
        height: 240rpx;
        border-radius: 8rpx;
        image {
          width: 100%;
          height: 100%;
        }
      }
      .goodsImgShow {
        margin-top: 15rpx;
        width: 240rpx;
        height: 240rpx;
        border-radius: 8rpx;
        position: relative;
        > image {
          width: 100%;
          height: 100%;
        }
        .goodsImgChange {
          width: 79rpx;
          height: 48rpx;
          opacity: 0.8;
          background: #000000;
          border-radius: 8rpx;
          font-size: 24rpx;
          font-family: PingFangSC, PingFangSC-Regular;
          font-weight: 400;
          // text-align: left;
          color: #ffffff;
          text-align: center;
          line-height: 48rpx;
          position: absolute;
          top: 13rpx;
          right: 88rpx;
          z-index: 66;
        }
        .goodsImgDa {
          width: 48rpx;
          height: 48rpx;
          opacity: 0.8;
          background: #000000;
          border-radius: 8rpx;
          overflow: hidden;
          position: absolute;
          top: 13rpx;
          right: 16rpx;
          z-index: 66;
          image {
            width: 100%;
            height: 100%;
          }
        }
      }
    }
  }
  .events_zhe .wu_Huo {
    margin-top: 300rpx;
    display: flex;
    flex-direction: column;
    align-items: center;
    image {
      width: 600rpx;
      height: 420rpx;
    }
    text {
      display: inline-block;
      font-size: 28rpx;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: rgba(136, 136, 136, 1);
      line-height: 37px;
      position: relative;
      top: -90rpx;
    }
  }
  .events_zhe .list_zhe {
    padding: 0 36rpx;
    padding-top: 148rpx;
    box-sizing: border-box;
    width: 750rpx;
    // margin-top: 220rpx;
    .item_zhe {
      // width: 678px;
      height: 412rpx;
      background: #ffffff;
      box-shadow: 0px 2rpx 20rpx 0px rgba(0, 0, 0, 0.12);
      padding: 20rpx;
      margin-bottom: 26rpx;
      box-sizing: border-box;
      .top_zhe_huo {
        // width: 638px;
        width: 100%;
        height: 262rpx;
        image {
          width: 100%;
          height: 100%;
        }
      }
      .bottom_zhe_huo {
        margin-top: 23rpx;
        display: flex;
        // align-items: center;
        justify-content: space-between;
        .left_zhe_huo {
          .desc_ {
            font-size: 24rpx;
            font-family: PingFangSC, PingFangSC-Regular;
            font-weight: 400;
            // text-align: left;
            color: #999999;
            line-height: 33rpx;
            .time_ {
              margin-right: 12rpx;
            }
          }
          .name_ {
            font-size: 34rpx;
            font-family: PingFangSC, PingFangSC-Regular;
            font-weight: 400;
            text-align: justify;
            color: #111111;
            line-height: 48rpx;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 1;
          }
        }
        .right_zhe_huo {
          display: flex;
          align-items: center;

          .choose_ {
            margin-right: 12rpx;
            width: 36rpx;
            height: 36rpx;
            border-radius: 50%;
          }
          .nochoose_ {
            width: 36rpx;
            height: 36rpx;
            margin-right: 12rpx;
            border-radius: 50%;
          }
        }
      }
    }
  }
  .events_zhe,
  .goods_zhe {
    width: 750rpx;
    // height: 1464rpx;
    background: #ffffff;
    border-radius: 40rpx 40rpx 0px 0px;
    position: fixed;
    overflow: auto;
    left: 0;
    bottom: 0;
    right: 0;
    top: 92rpx;
    z-index: 666;
    .top_zhe {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 750rpx;
      height: 128rpx;
      background: #ffffff;
      border-radius: 40rpx 40rpx 0px 0px;
      padding: 0 36rpx;
      box-sizing: border-box;
      position: fixed;
      top: 92rpx;
      z-index: 6666;
      .center_zhe {
        font-size: 36rpx;
        font-family: PingFangSC, PingFangSC-Semibold;
        font-weight: 600;
        text-align: center;
        color: #111111;
      }
      .right_zhe {
        font-size: 32rpx;
        font-family: PingFangSC, PingFangSC-Medium;
        font-weight: 500;
        text-align: center;
        color: #0f6ede;
      }
      .left_zhe {
        font-size: 32rpx;
        font-family: PingFangSC, PingFangSC-Regular;
        font-weight: 400;
        // text-align: center;
        color: #000000;
      }
    }
  }
  .business_zhe {
    top: 454rpx;
    .top_zhe {
      top: 454rpx;
    }
  }
  .content_.contert_buss {
    min-height: 436rpx;
    padding-bottom: 72rpx;
  }
  .content_ {
    min-height: 508rpx;
    padding: 0 36rpx;
    position: relative;
    > textarea {
      padding-top: 128rpx;
      min-height: 210rpx;
      width: 100%;
      // width: 750rpx;
      font-size: 34rpx;
      font-family: PingFangSC, PingFangSC-Regular;
      font-weight: 400;
      text-align: justify;
      color: #111111;
      line-height: 48rpx;
    }
    .content_Business {
      position: absolute;
      bottom: 0;
      margin-top: 40rpx;
      display: flex;
      font-size: 28rpx;
      font-family: PingFangSC, PingFangSC-Regular;
      font-weight: 400;
      text-align: justify;
      color: #999999;
      align-items: center;

      text {
        margin-right: 20rpx;
      }
      image {
        width: 48rpx;
        height: 48rpx;
        opacity: 0.6;
        background: #000000;
        border-radius: 8rpx;
      }
    }
    .content_file {
      margin-top: 40rpx;
      .file_item {
        width: 678rpx;
        height: 116rpx;
        padding: 18rpx 20rpx;
        padding-right: 0;
        box-sizing: border-box;
        background: #f7f7f7;
        border-radius: 4rpx;
        margin-top: 20rpx;
        display: flex;
        justify-content: space-between;
        align-items: center;
        .left_file {
          display: flex;
          align-items: center;
          flex-shrink: 0;
          image {
            width: 80rpx;
            height: 80rpx;
            // background: #e8950d;
            border-radius: 4rpx;
          }
          text {
            width: 460rpx;
            margin-left: 20rpx;
            font-size: 28rpx;
            font-family: PingFangSC, PingFangSC-Regular;
            font-weight: 400;
            text-align: justify;
            color: #111111;
            line-height: 36rpx;
            max-width: 560rpx;
            word-break: break-all;
            word-warp: break-word;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
            overflow: hidden;
          }
        }
        .right_file {
          margin-right: 20rpx;
          width: 48rpx;
          height: 48rpx;
          opacity: 0.6;
          background: #000000;
          border-radius: 8rpx;
          image {
            width: 100%;
            height: 100%;
          }
        }
      }
    }
    .content_img {
      margin-top: 18rpx;
      display: flex;
      flex-wrap: wrap;
      .item_img {
        position: relative;
        margin-right: 18rpx;
        margin-top: 18rpx;
        width: 214rpx;
        height: 214rpx;
        border-radius: 8rpx;
        image {
          width: 100%;
          height: 100%;
        }
        .shan_img {
          z-index: 66;
          width: 48rpx;
          height: 48rpx;
          opacity: 0.6;
          background: #000000;
          border-radius: 8rpx;
          position: absolute;
          top: 15rpx;
          right: 15rpx;
        }
      }

      .item_img:nth-child(3n) {
        margin-right: 0;
      }
    }
    .content_video {
      position: relative;
      > image {
        z-index: 66;
        width: 48rpx;
        height: 48rpx;
        position: absolute;
        top: 28rpx;
        right: 28rpx;
      }
      margin-top: 36rpx;
      width: 678rpx;
      height: 412rpx;
      video {
        width: 100%;
        height: 100%;
      }
    }
    .content_huo {
      position: relative;
      .goods_delete {
        z-index: 66;
        position: absolute;
        top: 28rpx;
        right: 28rpx;
        width: 48rpx;
        height: 48rpx;
        // opacity: 0.6;
        background: #000000;
        border-radius: 8rpx;
        overflow: hidden;
        image {
          width: 100%;
          height: 100%;
        }
      }
      .goods_edit {
        z-index: 66;
        width: 79rpx;
        height: 48rpx;
        opacity: 0.6;
        background: #000000;
        border-radius: 8rpx;
        font-size: 24rpx;
        font-family: PingFangSC, PingFangSC-Regular;
        font-weight: 400;
        // text-align: left;
        text-align: center;
        line-height: 48rpx;
        color: #ffffff;
        position: absolute;
        top: 28rpx;
        right: 100rpx;
      }
      margin-top: 36rpx;
      padding: 20rpx;
      // width: 678px;
      height: 372rpx;
      background: #ffffff;
      border: 1rpx solid #eeeeee;
      border-radius: 4rpx;
      .top_huo {
        width: 638rpx;
        height: 262rpx;
        image {
          width: 100%;
          height: 100%;
        }
      }
      .bottom_huo {
        margin-top: 30rpx;
        display: flex;
        justify-content: space-between;
        .right_huo {
          width: 154rpx;
          height: 64rpx;
          background: #db361f;
          border-radius: 32rpx;
          line-height: 64rpx;
          text-align: center;
          font-size: 28rpx;
          font-family: PingFangSC, PingFangSC-Regular;
          font-weight: 400;
          // text-align: left;
          color: #ffffff;
          flex-shrink: 0;
        }
        .left_huo {
          .name_huo {
            font-size: 34rpx;
            font-family: PingFangSC, PingFangSC-Regular;
            font-weight: 400;
            text-align: justify;
            color: #111111;
            line-height: 48rpx;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 1;
          }
          .desc_huo {
            font-size: 24rpx;
            font-family: PingFangSC, PingFangSC-Regular;
            font-weight: 400;
            text-align: left;
            color: #999999;
            line-height: 33rpx;
            .address {
              margin-left: 23rpx;
            }
          }
        }
      }
    }
    .content_goods {
      .goods_delete {
        z-index: 66;
        position: absolute;
        top: 28rpx;
        right: 28rpx;
        width: 48rpx;
        height: 48rpx;
        opacity: 0.6;
        background: #000000;
        border-radius: 8rpx;
        overflow: hidden;
        image {
          width: 100%;
          height: 100%;
        }
      }
      .goods_edit {
        z-index: 66;
        width: 79rpx;
        height: 48rpx;
        opacity: 0.6;
        background: #000000;
        border-radius: 8rpx;
        font-size: 24rpx;
        font-family: PingFangSC, PingFangSC-Regular;
        font-weight: 400;
        // text-align: left;
        text-align: center;
        line-height: 48rpx;
        color: #ffffff;
        position: absolute;
        top: 28rpx;
        right: 100rpx;
      }
      position: relative;
      margin-top: 36rpx;
      padding: 20rpx;
      height: 220rpx;
      background: #ffffff;
      border: 1rpx solid #eeeeee;
      border-radius: 4rpx;
      display: flex;
      justify-content: space-between;
      box-sizing: border-box;
      .goods_left {
        flex-shrink: 0;
        width: 180rpx;
        height: 180rpx;
        image {
          width: 100%;
          height: 100%;
        }
      }
      .goods_right {
        flex: 1;
        margin-left: 20rpx;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 180rpx;
        .top_ {
          .g_title {
            font-size: 34rpx;
            font-family: PingFangSC, PingFangSC-Regular;
            font-weight: 400;
            text-align: justify;
            color: #111111;
            line-height: 48rpx;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 1;
          }
          .g_desc {
            font-size: 24rpx;
            font-family: PingFangSC, PingFangSC-Regular;
            font-weight: 400;
            // text-align: left;
            color: #999999;
            line-height: 33rpx;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 1;
          }
        }
        .bottom_ {
          display: flex;
          justify-content: space-between;
          .g_left {
            .price_ {
              font-size: 34rpx;
              font-family: PingFangSC, PingFangSC-Semibold;
              font-weight: 600;
              text-align: justify;
              color: #f24646;
            }
            .cost_ {
              font-size: 24rpx;
              font-family: PingFangSC, PingFangSC-Regular;
              font-weight: 400;
              text-decoration: line-through;
              text-align: justify;
              color: #999999;
              line-height: 33rpx;
            }
          }
          .g_right {
            width: 154rpx;
            height: 64rpx;
            background: #db361f;
            border-radius: 32rpx;
            line-height: 64rpx;
            text-align: center;
            font-size: 28rpx;
            font-family: PingFangSC, PingFangSC-Regular;
            font-weight: 400;
            // text-align: left;
            color: #ffffff;
          }
        }
      }
    }
  }
  .footer_ {
    white-space: nowrap; // 滚动必须加的属性
    margin-top: 24rpx;
    height: 88rpx;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    border-top: 1rpx solid #eeeeee;
    border-bottom: 1rpx solid #eeeeee;
    padding: 0 35rpx;
    padding-right: 20rpx;
    width: 800rpx;
    .footer_left {
      display: flex;
      height: 100%;
      align-items: center;
      > image {
        margin-right: 40rpx;
        width: 41rpx;
      }
      .foot_img {
        height: 39rpx;
        border-radius: 4rpx;
        // margin-top: 2rpx;
      }
      .foot_voice {
        height: 41rpx;
        border-radius: 50%;
      }
      .foot_file {
        height: 38rpx;
        border-radius: 4rpx;
      }
    }
    .footer_right {
      display: flex;
      align-items: center;
      > view {
        margin-left: 16rpx;
        width: 120rpx;
        height: 48rpx;
        border: 1rpx solid #cccccc;
        border-radius: 24rpx;
        display: flex;
        justify-content: space-between;
        align-items: center;
        box-sizing: border-box;
        padding-right: 16rpx;
        text {
          font-size: 24rpx;
          font-family: PingFangSC, PingFangSC-Regular;
          font-weight: 400;
          color: #111111;
          padding-left: 5rpx;
          box-sizing: border-box;
        }
        image {
          width: 24rpx;
          height: 24rpx;
          // margin-top: 1rpx;
        }
      }
      .foot_Business {
        display: flex;
        align-items: center;
        margin-left: 0;
        padding-left: 20rpx;
      }
      .foot_event {
        display: flex;
        align-items: center;
        padding-left: 21rpx;
        // padding-right: 28rpx;
        image {
          // margin-top: -0.5rpx;
          padding-top: 5rpx;
          width: 24rpx;
          height: 28rpx;
        }
      }
      .foot_goods {
        display: flex;
        align-items: center;
        padding-left: 21rpx;
        // padding-right: 27rpx;

        image {
          padding-top: 1rpx;
          // margin-top: 1rpx;
          margin-right: -2rpx;
          height: 30rpx;
          width: 28rpx;
        }
      }
      .foot_money {
        > view {
          display: flex;
          align-items: center;
        }
        padding-left: 21rpx;
        // padding-right: 13rpx;
        justify-content: space-between;
        image {
          width: 28rpx;
          height: 28rpx;
          border-radius: 50%;
        }
      }
    }
  }
  .navigation {
    position: fixed;
    top: 0;
    left: 0;
    background-color: #fff;
    z-index: 99;
    width: 750rpx;
    height: 92rpx;
    background: #f8f8f8;
    width: 750rpx;
    box-sizing: border-box;
    padding: 0 36rpx;
    display: flex;
    justify-content: space-between;
    align-items: center;
    .navigation_l {
      width: 88rpx;
      height: 52rpx;
      display: flex;
      align-items: center;
      padding-left: 2rpx;
      box-sizing: border-box;
      image {
        width: 18rpx;
        height: 31rpx;
      }
    }
    .navigation_c {
      font-size: 36rpx;
      font-family: PingFangSC, PingFangSC-Medium;
      font-weight: 500;
      text-align: center;
      color: #111111;
    }
    .navigation_r {
      width: 88rpx;
      height: 52rpx;
      background: #0f6ede;
      border-radius: 8rpx;
      line-height: 52rpx;
      text-align: center;
      font-size: 28rpx;
      font-family: PingFangSC, PingFangSC-Regular;
      font-weight: 400;
      color: #ffffff;
    }
  }
}
</style>
